<?php

class Application_Model_Object
{

    public function __construct($data = null)
    {
        if (is_array($data)) {
            $this->setOptions($data);
        } else if ($data instanceof Zend_Config) {
            $this->setConfig($data);
        }
    }

    public function __set($name, $value)
    {
        $name = strtolower($name);

        if (null === $value) {
            unset($this->$name);
        } else {
            $this->$name = $value;
        }
    }
    public function __get($name)
    {
        $name = strtolower($name);

        if (isset($this->$name)) {
            return $this->$name;
        } else {
            return null;
        }
    }
    public function setConfig(Zend_Config $config)
    {
        $this->setOptions($config->toArray());
    }
    public function setOptions(array $options)
    {
    }


}

